﻿namespace KingerRobot.MexicoSailunMDC.SpiService;
internal interface IWcsEquipLocHold
{
    /// <summary>
    /// 获取所有设备管理货位
    /// </summary>
    /// <returns></returns>
    List<POWcsEquipLocHold> GetEquipLocHolds();
    /// <summary>
    /// 查找具体管理库位
    /// </summary>
    /// <param name="locId"></param>
    /// <returns></returns>
    POWcsEquipLocHold GetEquipLocHoldByLoc(long locId);
    /// <summary>
    /// 获取堆垛机管理空货位
    /// </summary>
    /// <param name="crnForkInfos"></param>
    /// <param name="isTask">是否去掉任务数占用的货位【是：true；否：false】</param>
    /// <returns></returns>
    List<POWcsEquipLocHold> GetNoGoodsEquipLocHoldsByCrn(List<CrnForkInfo> usableCrnForkInfos,
        List<CrnForkInfo> abnormalCrnForkInfos,
        List<PORcsLocation> locations, bool isTask = true);



    /// <summary>
    /// 获取堆垛机管理空货位
    /// </summary>
    /// <param name="crnForkInfos"></param>
    /// <param name="height"></param>
    /// <param name="isTask">是否去掉任务数占用的货位【是：true；否：false】</param>
    /// <returns></returns>
    List<POWcsEquipLocHold> GetNoGoodsEquipLocHoldsByCrn(List<CrnForkInfo> usableCrnForkInfos,
        List<CrnForkInfo> abnormalCrnForkInfos,
        List<PORcsLocation> locations, List<POWcsEquipLocHold> equipLocHold);


    ///// <summary>
    ///// 新版获取堆垛机管理空货位 只取配对双空库位
    ///// </summary>
    ///// <param name="usableCrnForkInfos"></param>
    ///// <param name="abnormalCrnForkInfos"></param>
    ///// <param name="locations"></param>
    ///// <param name="equipLocHold"></param>
    ///// <returns></returns>
    //List<POWcsEquipLocHold> GetNoGoodsEquipLocHoldsByCrnV2(List<CrnForkInfo> usableCrnForkInfos,
    //List<CrnForkInfo> abnormalCrnForkInfos,
    //List<PORcsLocation> locations, List<POWcsEquipLocHold> equipLocHold);

    /// <summary>
    /// 获取堆垛机管理有货货位
    /// </summary>
    /// <returns></returns>
    List<POWcsEquipLocHold> GetGoodsEquipLocHolds(List<CrnForkInfo> crnForkInfos);
    /// <summary>
    /// 获取堆垛机管理有货货位
    /// </summary>
    /// <param name="crnForkInfos"></param>
    /// <param name="productN"></param>
    /// <returns></returns>
    List<POWcsEquipLocHold> GetGoodsEquipLocHoldsV2(List<CrnForkInfo> crnForkInfos, List<ProductLocBean> productN, List<POWcsEquipLocHold> wcsEquipLocHolds);

    /// <summary>
    /// 同步库区堆垛机物料数量
    /// </summary>
    /// <returns></returns>
    List<WcsWarehouseCrnMaterialInfo> WscSyncWarehouseMaterial();

    /// <summary>
    /// 插入同步的库区堆垛机物料信息
    /// </summary>
    /// <param name="wcsWarehouseCrnMaterialInfos"></param>
    void UpdateWarehouseMaterial(List<WcsWarehouseCrnMaterialInfo> wcsWarehouseCrnMaterialInfos);
}